import type {IRouteConfig} from '@/router/typing';

import {CardStyleInterpolators} from '@react-navigation/stack';

import Login from '@/screens/auth/login/index';
import ResetPassword from '@/screens/auth/login/reset-pwd';
import SmsLogin from '@/screens/auth/login/sms-login';

export type LoginStackParamList = {
  LOGIN: undefined;
  RESET_PWD: undefined;
  SMS_LOGIN: undefined;
};

type LoginStackName = keyof LoginStackParamList;

const routes: IRouteConfig<LoginStackName>[] = [
  {
    component: Login,
    name: 'LOGIN',
    options: {
      cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS,
      headerShown: false,
      title: '登录',
    },
  },
  {
    component: SmsLogin,
    name: 'SMS_LOGIN',
    options: {
      cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS,
      headerShown: false,
      title: '短信登录',
    },
  },
  {
    component: ResetPassword,
    name: 'RESET_PWD',
    options: {
      cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS,
      headerShown: false,
      title: '重置密码',
    },
  },
];

export default routes;
